package com.jy.horny.api

import com.framework.network.remote.BaseResponse
import com.jy.chat.kit.model.ActionModel
import com.jy.horny.model.HomeListModel
import com.jy.horny.model.IMTokenModel
import com.jy.horny.model.LoginUserModel
import com.jy.horny.model.PolicyModel
import com.jy.horny.model.ServerUserInfo
import com.jy.horny.model.UserInfoBaseModel
import com.jy.horny.model.UserInfoModel
import io.reactivex.Single
import retrofit2.http.Body
import retrofit2.http.POST

/**
 * @ClassName: ApiService
 * @Description:
 * @Author: You
 */
interface ApiService {


    /**
     * 获取协议接口
     */
    @POST("api/app/configs")
    fun postPolicy(@Body map: @JvmSuppressWildcards HashMap<String, Any>): Single<BaseResponse<PolicyModel>>

    /**
     * 获取客服信息接口
     */
    @POST("api/app/configs")
    fun postServerUserInfo(@Body map: @JvmSuppressWildcards HashMap<String, Any>): Single<BaseResponse<List<ServerUserInfo>>>


    /**
     * 获取首页列表数据接口
     */
    @POST("api/home/homepage")
    fun postHomeList(@Body map: @JvmSuppressWildcards HashMap<String, Any>): Single<BaseResponse<HomeListModel>>

    /**
     * 获取IM凭证接口
     */
    @POST("api/auth/getIMtoken")
    fun postIMToken(@Body map: @JvmSuppressWildcards HashMap<String, Any>): Single<BaseResponse<IMTokenModel>>

    /**
     * 用户行为接口
     */
    @POST("api/users/addAction")
    fun postAddAction(@Body map: @JvmSuppressWildcards HashMap<String, Any>): Single<BaseResponse<ActionModel>>

    /**
     * 用户注销接口
     */
    @POST("api/auth/logout")
    fun postAuthDelete(@Body map: @JvmSuppressWildcards HashMap<String, Any>): Single<BaseResponse<String>>

    /**
     * 获取是否回归用户接口
     */
    @POST("api/auth/checkLogout")
    fun postAuthCheckLogOut(@Body map: @JvmSuppressWildcards HashMap<String, Any>): Single<BaseResponse<String>>

    /**
     * 获取用户的基本信息接口
     */
    @POST("api/users/getUserInfo")
    fun postUserInfoBase(@Body map: @JvmSuppressWildcards HashMap<String, Any>): Single<BaseResponse<UserInfoBaseModel>>

    /**
     * 获取用户信息接口
     */
    @POST("api/users/userInfo")
    fun postUserInfo(@Body map: @JvmSuppressWildcards HashMap<String, Any>): Single<BaseResponse<UserInfoModel>>

    /**
     * 用户登录接口
     */
    @POST("api/auth/login")
    fun postAuthLogin(@Body map: @JvmSuppressWildcards HashMap<String, Any>): Single<BaseResponse<LoginUserModel>>


    /**
     * OSS配置
     */
//    @GET("ibuy-ddll/driver/util/oss/sts")
//    fun testHttpRequest(): Single<BaseResponse<TestModel>>


}

